Imports System
Imports System.Web.UI
Imports System.Web.UI.WebControls

Namespace WroxControls 

  Public Class MyLabelInVB

	  Inherits WebControl

		Public Sub New()
			MyBase.New("h1")
		End Sub


		dim _text as String

		Public Property Text as String

			Get
				Text = _text
			End Get

			Set
				_text = Value
			End Set

		End Property

		Overrides Protected Sub OnInit(e as EventArgs)

			if ( _text is Nothing ) then
	             _text = "Here is some default text"
			end if

		End Sub

	    Overrides Protected Sub RenderContents(writer as HtmlTextWriter) 
	      writer.Write( _text )
	    End Sub

  End Class

End Namespace 
